import request from '@/utils/request'

// 查询代理商充值订单列表
export function listAgentAdd(query) {
  return request({
    url: '/agentAdd/agentAdd/list',
    method: 'get',
    params: query
  })
}

// 查询代理商充值订单详细
export function getAgentAdd(id) {
  return request({
    url: '/agentAdd/agentAdd/' + id,
    method: 'get'
  })
}

// 新增代理商充值订单
export function addAgentAdd(data) {
  return request({
    url: '/agentAdd/agentAdd',
    method: 'post',
    data: data
  })
}

// 修改代理商充值订单
export function updateAgentAdd(data) {
  return request({
    url: '/agentAdd/agentAdd',
    method: 'put',
    data: data
  })
}

// 删除代理商充值订单
export function delAgentAdd(id) {
  return request({
    url: '/agentAdd/agentAdd/' + id,
    method: 'delete'
  })
}
// 查询所有代理商
export function getlistAllAgent() {
  return request({
    url: '/agent/agentManage//listAllAgent' ,
    method: 'post'
  })
}
// 查询所有商家
export function getlistMyStroe() {
  return request({
    url: '/store/storeManage/listMyStroe' ,
    method: 'post'
  })
}
// 代理商充值
export function Submitagent(data) {
  return request({
    url: '/amount/adds/agent' ,
    method: 'post',
    data: data
  })
}
// 商户充值
export function Submitstore(data) {
  return request({
    url: '/amount/adds/store' ,
    method: 'post',
    data: data
  })
}
